package cn.com.api.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

//import oracle.net.aso.o;

import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiT_member;
import cn.com.api.entity.ApiT_order;
import cn.com.api.entity.ApiU_advert;
import cn.com.api.service.base.T_orderServiceBase;
import cn.com.util.PageInfo;

/**
 * 
 */
@Service
public interface ApiT_orderService extends T_orderServiceBase {

	// 新增对象后返回记录ID
	public int T_orderInsertion(ApiT_order t_order);

	public List<ApiT_order> findOrderByMap(Map map);

	public ApiT_order getOrderByOrderNum(String orderNum);

	public List<ApiT_order> getOrdersByUserId(String userId, String status, int from, int to);

	public List<ApiT_order> getUserOrders(String userId, String status, PageInfo page);

	public boolean checkProductStatus(String productId, String topicId);

	public boolean checkProductStore(String productId, String count);

	public void cancelOrder(Map<String, Object> map);

	public List<Map<String, Object>> getRelationByProduct(List<String> productIds, String userId);

	public List<Map<String, Object>> getRelationByProduct(List<String> productIds, String userId, String currentDay,
			String currentHour);

	public void updateOrderEnable(String orderNum);

	/**
	 * @Title: getorderInfoByadvertid
	 * @Description: 根据广告获取订单信息
	 * @param advertid
	 * @return
	 * @throws Exception
	 * @return ApiT_order
	 */
	public ApiT_order getorderInfoByadvertid(String advertid) throws Exception;

	public void updateOrderDDstatusByOrderNum(String orderNum, String status);

	public void updateRemindShipmentByOrderNum(String orderNum, String time);

	// 特卖汇订单
	public List<Map<String, String>> selectByOrListPage(Map<String, Object> map, PageInfo pageInfo) throws Exception;

	// 广告订单
	public List<ApiT_order> selectMyOrderListPage(Map<String, Object> map, PageInfo pageInfo) throws Exception;

	public List<Map<String, Object>> selectBackOrder(Map<String, Object> map, PageInfo pageInfo);

	public void updateSendStatus(Map<String, Object> map);

	public int findT_orderCountByTargetId(Map<String, String> params);

	// 创建订单
	public ApiT_order createadvertorder(Integer advertid, ApiT_member apiT_member, ApiU_advert advert) throws Exception;

	// 余额支付
	public Map<String, Object> usermoneypay(String rid, String paypwd, Integer user_id, BigDecimal amount)
			throws Exception;

	public Map<String, Object> create_order(String userId, String carIds, String pwd, String payType, String address,
			String peiSong, String memo, String sendfee, String rIp, String isQuan, String quanId, String receiptTitle,
			String receiptDesc, String receiptRemark) throws Exception;
}
